/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de Almeria
 * License Type: Purchased
 */
package foroindaltronia.bd;

import java.io.Serializable;
public class Tema implements Serializable {
	public Tema() {
	}
	
	private void this_setOwner(Object owner, int key) {
		if (key == foroindaltronia.bd.ORMConstants.KEY_TEMA_GESTIONADO) {
			this.gestionado = (foroindaltronia.bd.Moderador) owner;
		}
		
		else if (key == foroindaltronia.bd.ORMConstants.KEY_TEMA_CREADO_POR) {
			this.creado_por = (foroindaltronia.bd.Usuario) owner;
		}
	}
	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}
		
	};
	
	private String nombre;
	
	private java.util.Date fechaCreacion;
	
	private int ID;
	
	private foroindaltronia.bd.Moderador gestionado;
	
	private foroindaltronia.bd.Usuario creado_por;
	
	public void setNombre(String value) {
		this.nombre = value;
	}
	
	public String getNombre() {
		return nombre;
	}
	
	public void setFechaCreacion(java.util.Date value) {
		this.fechaCreacion = value;
	}
	
	public java.util.Date getFechaCreacion() {
		return fechaCreacion;
	}
	
	private void setID(int value) {
		this.ID = value;
	}
	
	public int getID() {
		return ID;
	}
	
	public int getORMID() {
		return getID();
	}
	
	public void setGestionado(foroindaltronia.bd.Moderador value) {
		if (gestionado != null) {
			gestionado.gestiona.remove(this);
		}
		if (value != null) {
			value.gestiona.add(this);
		}
	}
	
	public foroindaltronia.bd.Moderador getGestionado() {
		return gestionado;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_Gestionado(foroindaltronia.bd.Moderador value) {
		this.gestionado = value;
	}
	
	private foroindaltronia.bd.Moderador getORM_Gestionado() {
		return gestionado;
	}
	
	public void setCreado_por(foroindaltronia.bd.Usuario value) {
		if (creado_por != null) {
			creado_por.crea.remove(this);
		}
		if (value != null) {
			value.crea.add(this);
		}
	}
	
	public foroindaltronia.bd.Usuario getCreado_por() {
		return creado_por;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_Creado_por(foroindaltronia.bd.Usuario value) {
		this.creado_por = value;
	}
	
	private foroindaltronia.bd.Usuario getORM_Creado_por() {
		return creado_por;
	}
	
	public String toString() {
		return String.valueOf(getID());
	}
	
}
